package jPush.dao;

//推送消息

import java.io.Serializable;
import java.util.List;


public class JPushMessage implements Serializable {
    public final static int ALL = 0; //无角色（消息中用到）
    public final static int SINGLE = 100; //单独对象（消息中用到）
    public final static int SUPER_ADMIN = 99; //99超级管理员
    public final static int SHOP_OWNER = 1; //1店主
    public final static int USER = 2;//2用户
    public final static int ADMIN = 3;//3管理员
    public final static int POSTMAN = 4;//4配送员
    public final static int BUSINESS_MAN = 5;//业务员
    public final static int CUSTOMER_SERVICE = 6;//客服


    private String title;//标题
    private String content;//内容
    private boolean isCitySeller = false;//是否为推送给某个城市的工人  如果是退给某给城市的工人，需要先获取工人，在推送
    private String city;//城市
    private String orderNo;// 订单号
    private String username;
    private String jpSubType; // 子分类
    private int pushUserType = JPushMessage.SHOP_OWNER;//默认推送给商户
    private List<String> usernameList;

    private Long pushUserInnerType;


    public JPushMessage() {
    }

    public JPushMessage(boolean isCitySeller, String city, String title, String content) {
        this.title = title;
        this.content = content;
        this.isCitySeller = isCitySeller;
        this.city = city;
    }

    public JPushMessage(String username, String title, String content) {
        this.title = title;
        this.content = content;
        this.username = username;
    }
//
//    public JPushMessage(List<String> usernameList, String title, String content) {
//        this.title = title;
//        this.content = content;
//        this.usernameList = usernameList;
//    }


    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public List<String> getUsernameList() {
        return usernameList;
    }

    public void setUsernameList(List<String> usernameList) {
        this.usernameList = usernameList;
    }

    public synchronized JPushMessage clone() {
        JPushMessage jPushMessage = new JPushMessage();
        //自己复制参数克隆
        jPushMessage.setUsername(this.getUsername());
        jPushMessage.setTitle(this.getTitle());
        jPushMessage.setContent(this.getContent());
        jPushMessage.setUsernameList(this.getUsernameList());
        jPushMessage.setJpSubType(this.getJpSubType());

        return jPushMessage;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public boolean getIsCitySeller() {
        return isCitySeller;
    }

    public void setIsCitySeller(boolean isCitySeller) {
        this.isCitySeller = isCitySeller;
    }

    public int getPushUserType() {
        return pushUserType;
    }

    public void setPushUserType(int pushUserType) {
        this.pushUserType = pushUserType;
    }

    public Long getPushUserInnerType() {
        return pushUserInnerType;
    }

    public void setPushUserInnerType(Long pushUserInnerType) {
        this.pushUserInnerType = pushUserInnerType;
    }


    public String getJpSubType() {
        return jpSubType;
    }

    public void setJpSubType(String jpSubType) {
        this.jpSubType = jpSubType;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }
}
